Android article,How to play audio file in MediaPlayer Android systems
نوشته شده توسط : dotnek

Using MediaPlayer, the user can play different types of audio files and categorize them or access them through audio albums. This program has features that include the ability to show the duration of the song, rewind or forward songs, change songs, access to all audio files on the device through this MediaPlayer.

What you will learn in this tutorial is as follows:

- MediaPlayer and its applications - How to create a MediaPlayer project - Familiarity with different types of MediaPlayer methods and their applicationsThere are different ways to play audio in Android , one of which is very useful and convenient is MediaPlayer. In MediaPlayer there are also some methods that can be used to play audio.

- Start () method:

Using this method, you can play the audio file. If this method is called, the audio file can start playing from the beginning.

- Pause () method:

This method is also used to stop playing audio files. In this case, if the audio file has already been played using the start () method, you can use pause () to stop it. Of course, if we stop the audio file and try to play it again, we use the start () method. In this way, using this method, the audio file will be played from where it was, not from the beginning.

- Reset () method:

Used to reset MediaPlayer.

- IsPlaying () method:

This method is also used to check if music is playing or not. It also returns true or false values ​​and says whether the music is playing or not.

- SeekTo () method:

It should be noted that this method takes a value of type int and moves the audio file to the same position. For example, giving a value of 26 to this method can cause the audio file to start playing from 26 seconds.

- GetCurrentPosition () method:

This method can also send the current position of the player. Returns the audio file in any situation. 

Read more on:https://www.dotnek.com/Blog/Apps/how-to-play-audio-file-in-mediaplayer-android

link:https://dotnek.mystrikingly.com/

Related link:Android Development





:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 147
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : سه شنبه 19 مرداد 1400 | نظرات ()
مطالب مرتبط با این پست
لیست
می توانید دیدگاه خود را بنویسید


نام
آدرس ایمیل
وب سایت/بلاگ
:) :( ;) :D
;)) :X :? :P
:* =(( :O };-
:B /:) =DD :S
-) :-(( :-| :-))
نظر خصوصی

 کد را وارد نمایید:

آپلود عکس دلخواه: